<?xml version="1.0" encoding="UTF-8"?>
<ui:composition
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
		xmlns:f="http://xmlns.jcp.org/jsf/core"
		xmlns:h="http://xmlns.jcp.org/jsf/html"
		xmlns:p="http://primefaces.org/ui"
		xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
		template="/WEB-INF/templates/public/default.xhtml"
>
	<ui:define name="head">
		<h:outputStylesheet name="css/public/userlogin.css" />
	</ui:define>

	<ui:define name="content">
		<div class="sub-container">
			<!--招标公告-->
			<div class="sub_wrap">
				<div class="Methbox_tit">
					<h2 class="loginName" style="min-width:400px">当前登录用户</h2>
					<span><p:link
							outcome="/index.xhtml"
							value="平台首页"
					/> &gt;用户登录</span>
				</div>
				<div class="Methbox_con">
					<div class="zc_box">
						<div class="fleft zc_box2">
							<div class="zc_box3">
								<p:link href="/business/supplier/UnapplyTradeList.xhtml">
									<img
										src="#{resource['img/first/dl_zj.png']}"
										alt=""
										class="zc_img"
									/>
									<h1 class="zc_h1">我是中介机构</h1>
								</p:link>
							</div>
						</div>
						<div class="fleft zc_box4">
							<div class="zc_box3">
								<p:link href="/business/buyer/UnauditBulletinList.xhtml">
									<img
										src="#{resource['img/first/dl_cg.png']}"
										alt=""
										class="zc_img"
									/>
									<h1 class="zc_h1">我是采购人</h1>
								</p:link>
							</div>
						</div>
						<div class="clearb"></div>
					</div>
				</div>
			</div>
		</div>
		<script>
			// <![CDATA[
			var ticket = '#{param.ticket}';
			$(function(){
				parent.postMessage(location.href, location.origin)
				if(ticket == '' || ticket == null){
					alert("票据参数不存在！");
					return;
				}
				var authUrl = '#{request.getContextPath()}/rest/auth/resolving/'+ticket;
				$.ajax({
					url:authUrl,
					type:"GET",
					async:false,
					success:function (data) {
						var retcode = data.retcode;
						if(retcode == 100003){
							alert(data.msg);
							return;
						}else if(retcode == 000000){
							console.log(data);
							var username  = data.loginname;
							var name = data.name;
							$(".loginName").append("-"+ data.name+"("+username+")");
						}
					}
				});
			});
			// ]]>
		</script>
	</ui:define>

</ui:composition>
